#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include "chatwindow.h"
#include "rolemanager.h"
#include "chatconfig.h"
#include "ragwindow.h"

#include <QMainWindow>
#include <QComboBox>
#include <QCheckBox>
#include <QPushButton>
#include <QGroupBox>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLabel>
#include <QLineEdit>
#include <QDialog>
#include <QTextEdit>
#include <QDialogButtonBox>
#include <QMessageBox>
#include <QFormLayout>
#include <QDebug>

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void onRoleSelected(int index);
    void startChat();
    void showCustomRoleDialog();
    void ragSearch();

private:
    void initUI();
    void initRoles();

    QCheckBox *m_autoSpeechCheckBox;
    QPushButton *m_startButton;
    QPushButton *m_customRoleButton;
    QPushButton *m_ragSearchButton;
    QComboBox *m_modelComboBox;
    QComboBox *m_roleComboBox;

    RoleManager *m_roleManager;
    QMap<QString, Role> m_roles;
    ChatConfig m_currentConfig;
};

#endif // MAINWINDOW_H
